1. Field of the Invention
The present invention relates to a memory. More particularly, the present invention relates to a storage device, an electronic device, and a method for programming a memory.
2. Description of the Related Art
Modern mobile electronic devices, such as smart phones, use embedded multimedia cards (eMMCs) as storage devices for mass data storage. The eMMC is based on NAND (negated AND) flash technology. Users often power on or shut down smart phones during operation. Sometimes this kind of behavior causes sudden power-off for the eMMC storage of a smart phone. Due to characteristics of NAND flash memories, some data in the eMMC storage may be corrupted under this situation.
There are three types of NAND flash memories, namely, single-level cell (SLC), multi-level cell (MLC) and triple-level cell (TLC). An SLC flash memory stores 1 bit per cell. An MLC flash memory stores 2 bits per cell. A TLC flash memory stores 3 bits per cell. From this architectural difference, MLC and TLC have higher data capacity and cheaper price but shorter lifespan compared to SLC.
The pages of an MLC flash memory may be classified into two groups, namely, group A and group B. The pages in group A consist of the least significant bits (LSBs) of the cells, while the pages in group B consist of the most significant bits (MSBs) of the cells. The pages in groups A and B are associated in pairs. In other words, each pair consists of a page in group A and a page in group B. The following table 1 is an example of page pairs of an MLC flash memory. Each row in table 1 is a page pair. For example, page 9 in group A and page 12 in group B are associated as a pair. Page 9 consists of the LSBs of some cells of the MLC flash memory, while page 12 consists of the MSBs of the same cells of the MLC flash memory.
TABLE 1Group AGroup B0214364871091211 1413 16. . .. . .
The pages in a pair share common word lines. Due to characteristics of NAND flash memories, for each pair, the page in group A has to be programmed before the page in group B. When sudden power failure occurs during programming the page in group A, page corruption appears only in the page in group A. However, when sudden power failure occurs during programming the page in group B, page corruption can appear not only in the page in group B but also in the associated page in group A that was already programmed. Sometimes the corruption in the page in group A is unexpected for the operating system (OS) of the smart phone, which may lead to booting deadlock due to page corruption. For the sake of reliability, the page in group A should be backed up before programming the page in group B.
This backup operation can produce additional busy time of the flash memory; therefore it can affect the performance of the flash memory. Conventionally it is very difficult to keep data reliability as well as maintain better performance of eMMC storage.
The discussions above can be extended to MLC flash memories. The pages of a TLC flash memory may be classified into three groups, namely, group A, group B and group C. The pages in group A consist of the LSBs of the cells. The pages in group B consist of the middle bits of the cells. The pages in group C consist of the MSBs of the cells. The pages in groups A, B and C are associated in sets. In other words, each set consists of a page in group A, a page in group B and a page in group C. When sudden power failure occurs during programming a page in group A, page corruption appears only in the page in group A. When sudden power failure occurs during programming the associated page in group B, page corruption can appear in the page in group A and the page in group B. When sudden power failure occurs during programming the associated page in group C, page corruption can appear in the page in group A, the page in group B and the page in group C. Therefore, data backup for the pages in group A and group B is necessary.